package com.rabbiter.oes.service;

import com.rabbiter.oes.dto.RePassDTO;
import com.rabbiter.oes.dto.RegisterDTO;
import com.rabbiter.oes.entity.Admin;
import com.rabbiter.oes.entity.Student;
import com.rabbiter.oes.entity.Teacher;
import com.rabbiter.oes.enums.RoleEnum;
import com.rabbiter.oes.result.R;

public interface LoginService {

    /**
     * 通过账号获取该账号所属身份
     * @param uname
     * @return
     */
    public RoleEnum getRole(String uname);

    public Admin adminLogin(String username, String password);

    public Teacher teacherLogin(String username, String password);

    public Student studentLogin(String username, String password);

    /**
     * 找回密码
     * @param rePassDTO
     * @return
     */
    public R repass(RePassDTO rePassDTO);

    /**
     * 注册用户
     * @param registerDTO
     * @return
     */
    public R register(RegisterDTO registerDTO);
}
